package cn.itcast.controller;




import cn.itcast.entity.Result;
import cn.itcast.service.LoginService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(path = "/user")
public class LoginController {
    @Reference
    private LoginService loginService;

    @PostMapping("/login")
    public Result login( @RequestBody Map map){
        System.out.println(map);
        Result result =loginService.login(map);
        return result;
    }
}
